package com.yilin.tms.capital.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yilin.tms.core.application.PageData;
import com.yilin.tms.core.application.ReturnData;
import com.yilin.tms.core.entity.capital.TradeRecord;
import com.yilin.tms.core.entity.order.payment.OrderPaymentCost;
import com.yilin.tms.core.entity.order.payment.OrderRefundCost;
import com.yilin.tms.core.entity.order.payment.OrderSettlementCost;
import com.yilin.tms.core.entity.order.payment.ServicePaymentCost;
import com.yilin.tms.core.entity.user.account.Account;

import java.util.List;
import java.util.Map;

public interface ITradeRecordService extends IService<TradeRecord> {


    TradeRecord createPaymentTradeRecord(List<OrderPaymentCost> paymentList, Account loginUser);

    TradeRecord createRefundTradeRecord(OrderRefundCost orderRefundCost, Account loginUser);

    TradeRecord createSettlementTradeRecord(List<OrderSettlementCost> settlementList, Account loginUser);

    TradeRecord createServicePaymentTradeRecord(List<ServicePaymentCost> servicePaymentList, Account loginUser);


    ReturnData<Object> noticePaymentResult(String[] tradeRecordIds);

    TradeRecord getTradeRecordById(String tradeRecordId);

    List<TradeRecord> getTradeRecordListByIds(List<String> tradeRecordIds);

    List<TradeRecord> getTradeRecordListByTradeNo(List<String> tradeRecordTradeNos);


    List<TradeRecord> getTradeRecordListByBatchNo(String batchNo);

    TradeRecord getTradeRecordByTradeNo(String tradeNo);

    TradeRecord queryTradeRecordByPaymentId(String paymentOrderId);

    PageData<TradeRecord> getTradeRecordPage(TradeRecord query, Account loginUser, Integer page, Integer limit);
    //  收款记录 进账

    PageData<TradeRecord> getIncomeTradeRecordPage(TradeRecord query, Account loginUser, Integer page, Integer limit);
    //  付款记录 出账

    PageData<TradeRecord> getPayoutTradeRecordPage(TradeRecord query, Account loginUser, Integer page, Integer limit);

    Map<String, Double> getTradeInoutData(Account loginUser, String startTime, String endTime);

    List<TradeRecord> getErrorTmsTradeRecord();



}
